package com.aaa.service;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 荆豪峰
 * @version 1.0
 */
@Service
public class CarshierImpl implements Carshier {
    @Autowired
    private BookShopService bookShopService;

    @Transactional
    public void buy(List<String> isbns, String username) {
        for (String isbn : isbns){
             bookShopService.purchase(isbn,username);
        }
    }
}
